// logo图标以及搜索框
<template>
  <div id=logo_search>
    <el-form :inline="true" id="logo_login">
      <el-form-item>
        <img class="block inpp" id="logo" @click="logo_click()" width="150px" src="../images/logo.gif" alt="" />
      </el-form-item>

      <el-form-item class="inpp">
        <el-input id="nr" v-model="formInline.user" placeholder="请输入查询关键字"></el-input>
      </el-form-item>
      <el-form-item class="inpp">
        <el-button type="primary" @click="onSubmit">搜索</el-button>
      </el-form-item>

      <el-form-item class="inpp" style="float:right">
        <slot></slot>
      </el-form-item>

    </el-form>
  </div>
</template>

<script>
export default {
  props: ["logo", "input"],
  data() {
    return {
      formInline: {
        user: "",
        region: "",
      },
    };
  },
  methods: {
    onSubmit() {
      console.log("你点击了一下搜索");
    },
    logo_click(){
      this.$emit('logo_click');
    }
  },
};
</script>

<style>
#logo_login{
  width: 70%;
  height: 60px;
  margin: auto;

}
#nr {
  height: 40px;
  width: 600px;
}

.block {
  display: inline-block;
}
#logo{
  margin-right: 150px;
}
/*  */
.inpp{
margin-top: 10px;
}
#logo_search{
  width: 100%;
}
</style>